|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.hierarchy.Vertex
public class Vertex
Represents a vertex of a polygonal mesh.
Doesn't contain any vertex data, manipulates vertex data
contained in J3DeGeometryArray referenced by
this vertex.
J3DeGeometryArray| Field Summary | |
|---|---|
static int |
COORDINATE_VERTEX_STATE
Positional coordinate state. |
static int |
HIDDEN
Specifies that this vertex is currently hidden. |
boolean |
inUse
Used by various classes that manipulate the data of multiple vertices. |
static int |
NORMAL
Specifies that this vertex is in normal state. |
static int |
SELECTED
Specifies that this vertex is currently selected. |
static int |
TEXTURE_VERTEX_STATE
Texture coordinate state. |
static int |
TRANSFORMABLE
Specifies that this vertex can be transformed. |
| Constructor Summary | |
|---|---|
protected |
Vertex(J3DeGeometryArray g,
int index)
Creates an inastance of Vertex which represents
index-th vertex in the specified J3DeGeometryArray. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Returns true if the Object o is of type Vertex and all of the positional coordinates of o are equal to the ones in this vertex. |
float |
getAlpha()
Returns the alpha component of the color of this vertex if available. |
float[] |
getColor()
Returns the color of this vertex. |
javax.vecmath.Point3f |
getCoordinate()
Returns the positional coordinates of this vertex. |
float[] |
getCoordinates()
Returns the positional coordinates of this vertex (X, Y, Z). |
protected J3DeGeometryArray |
getGeometry()
Returns J3DeGeometryArray. |
int |
getIndex()
Returns the index of this vertex. |
javax.vecmath.Vector3f |
getNormal()
Returns the normal vector of this vertex. |
java.awt.Color |
getRGB()
Returns the RGB color of this vertex. |
int |
getState(int type)
Returns the state of this vertex. |
float |
getZ()
Returns the Z-coordinate of this vertex. |
float |
getTex(int axis,
int texCoordSet)
Returns a texture coordinate of this vertex in the specified texture coordinate set. |
float[] |
getTexCoordinates(int texCoordSet)
Returns texture coordinates of this vertex in the specified texture coordinate set. |
float |
getX()
Returns the X-coordinate of this vertex. |
float |
getY()
Returns the Y-coordinate of this vertex. |
protected void |
set(Vertex vertex)
Copies all vertex data from the specified vertex to this vertex, including index and reference to J3DeGeometryArray. |
void |
setAlpha(float alpha)
Sets the alpha component of the color of this vertex if vertex color has alpha component. |
void |
setColor(float[] color)
Sets the color of this vertex. |
void |
setCoordinate(javax.vecmath.Point3f coordinates)
Sets the positional coordinates of this vertex. |
void |
setCoordinates(float[] coordinates)
Sets the positional coordinates of this vertex. |
protected void |
setData(Vertex vertex)
Copies all vertex data from the specified vertex to this vertex, excluding index and reference to J3DeGeometryArray. |
protected void |
setIndex(int index)
Sets the index of this vertex. |
void |
setNormal(javax.vecmath.Vector3f normal)
Sets the normal vector of this vertex. |
void |
setRGB(java.awt.Color color)
Sets the RGB color of this vertex. |
void |
setState(int state,
int type)
Changes the state of this vertex. |
void |
setZ(float z)
Sets the Z coordinate of this vertex. |
void |
setTex(float coordinate,
int axis,
int texCoordSet)
Sets a texture coordinate of this vertex. |
void |
setTexCoordinates(float[] coordinates,
int texCoordSet)
Sets the texture coordinates of this vertex. |
void |
setX(float x)
Sets the X coordinate of this vertex. |
void |
setY(float y)
Sets the Y coordinate of this vertex. |
java.lang.String |
toString()
Returns the String representation of this vertex. |
void |
translate(float[] xyz)
Translates this vertex. |
void |
translateZ(float z)
Changes the Z coordinate of this vertex. |
void |
translateTex(float[] xy,
int texCoordSet)
Changes texture coordinates of this vertex. |
void |
translateX(float x)
Changes the X coordinate of this vertex. |
void |
translateY(float y)
Changes the Y coordinate of this vertex. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HIDDEN
public static final int NORMAL
public static final int SELECTED
public static final int TRANSFORMABLE
public static final int COORDINATE_VERTEX_STATE
public static final int TEXTURE_VERTEX_STATE
public boolean inUse
| Constructor Detail |
|---|
protected Vertex(J3DeGeometryArray g,
int index)
Vertex which represents
index-th vertex in the specified J3DeGeometryArray.
g - J3DeGeometryArray the data of this vertex is in.index - index of this vertex in J3DeGeometryArray| Method Detail |
|---|
protected void set(Vertex vertex)
J3DeGeometryArray.
vertex - vertex which data will be copied to this vertexprotected void setData(Vertex vertex)
J3DeGeometryArray.
vertex - vertex which data will be copied to this vertexpublic int getIndex()
protected void setIndex(int index)
index - new indexpublic float[] getCoordinates()
public javax.vecmath.Point3f getCoordinate()
public float getX()
public float getY()
public float getZ()
public float[] getTexCoordinates(int texCoordSet)
texCoordSet - texture coordinate set
public float getTex(int axis,
int texCoordSet)
axis - coordinate axis: S, T, R or QtexCoordSet - texture coordinate set
public void setState(int state,
int type)
state - HIDDEN, NORMAL, SELECTED or TRANSFORMABLEtype - state type: COORDINATE_VERTEX_STATE or TEXTURE_VERTEX_STATEpublic int getState(int type)
type - state type: COORDINATE_VERTEX_STATE or TEXTURE_VERTEX_STATE
public void setCoordinates(float[] coordinates)
coordinates - new position of this vertexpublic void setCoordinate(javax.vecmath.Point3f coordinates)
coordinates - new position of this vertex
public void setTexCoordinates(float[] coordinates,
int texCoordSet)
coordinates - new texture coordinatestexCoordSet - texture coordinate set
public void setTex(float coordinate,
int axis,
int texCoordSet)
coordinate - new texture coordinateaxis - coordinate axis: S, T, R or QtexCoordSet - texture coordinate setpublic void translate(float[] xyz)
xyz - change of position on each axis
public void translateTex(float[] xy,
int texCoordSet)
xy - change of coordinates on S and T axistexCoordSet - texture coordinate setpublic void setX(float x)
x - new X coordinatepublic void translateX(float x)
x - change of position on X axispublic void setY(float y)
y - new Y coordinatepublic void translateY(float y)
y - change of position on Y axispublic void setZ(float z)
z - new Z coordinatepublic void translateZ(float z)
z - change of position on Z axispublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the Object with which the comparison is made
public java.lang.String toString()
toString in class java.lang.Objectprotected J3DeGeometryArray getGeometry()
J3DeGeometryArray.
J3DeGeometryArraypublic javax.vecmath.Vector3f getNormal()
public void setNormal(javax.vecmath.Vector3f normal)
normal - normal vectorpublic float[] getColor()
public void setColor(float[] color)
color - R, G and B if COLOR_3COLOR_3public java.awt.Color getRGB()
public void setRGB(java.awt.Color color)
color - Color with R, G and B componentspublic float getAlpha()
public void setAlpha(float alpha)
alpha - new value of alpha component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||